<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="header.jsp" %>
		<div id="header">ITBA - Alumni</div>
		<%@ include file="menu.jsp" %>		
		<div id="columna_der">	
			<!-- HAY Q SACAR TODO ESTO Y PONER EL HTML DE LA PAG INICIAL ITBA ALUMNI
			<h2>Recent Articles</h2>
			<table cellspacing="0" class="listas">
				<tr style="font-weight:bold;">
					<td width="160px"> Name </td> 
					<td width="70px"> Price </td> 
					<td width="125px"> Description </td> 
					<td width="150px"> Publication Date </td> 				 					
					<td width="60px"> Stock </td> 
					<td width="50px"> Condition </td> 
					<td width="90px"> Visit Counter </td> 
					<td width="80px"> Owner </td> 
					<td width="110px"> Category </td>
					<td width="110px"> Type </td>
				</tr>
				<c:forEach var="item" items="${lastItems}">
					<c:choose>
						<c:when test="${item.priority == 'true'}">
							<tr class="priority">
						</c:when>
						<c:otherwise>
							<tr>
						</c:otherwise>
					</c:choose>
						
						<td> <a href="../item/itemDetail?itemid=<c:out value='${item.id}' /> "> <c:out value="${item.name}" /> </a> </td> 
	 					<td> <c:out value="${item.precio}" /> </td> 
						<td> <c:out value="${item.description}" /> </td> 
						<td> <fmt:formatDate type="date" value="${item.publicationDate}" /> </td> 				 					
						<td> <c:out value="${item.count}" /> </td> 
								<td>
									<c:choose>
									<c:when test="${item.newItem == 'true'}">
										New	
									</c:when>
									<c:otherwise>
										Used
									</c:otherwise>
								</c:choose>
								</td> 
						<td> <c:out value="${item.visitCounter}" /> </td> 
						<td> <a href="../user/viewProfile?userid=<c:out value='${item.user.id}' /> "><c:out value="${item.user.name}" /></a> </td> 
						<td> <c:out value="${item.category.name}" /> </td>
						<td> <c:out value="${item.type}" /> </td> 
					</tr>
				</c:forEach>
			</table>		
			
			<h2>Top Items</h2>
			<table cellspacing="0" class="listas">
				<tr style="font-weight:bold;">
					<td width="160px"> Name </td> 
					<td width="70px"> Price </td> 
					<td width="125px"> Description </td> 
					<td width="150px"> Publication Date </td> 				 					
					<td width="60px"> Stock </td> 
					<td width="50px"> Condition </td> 
					<td width="90px"> Visit Counter </td> 
					<td width="80px"> Owner </td> 
					<td width="110px"> Category </td> 
					<td width="110px"> Type </td>
				</tr>
				<c:forEach var="item" items="${moreVisitedItems}">
					<c:choose>
						<c:when test="${item.priority == 'true'}">
							<tr class="priority">
						</c:when>
						<c:otherwise>
							<tr>
						</c:otherwise>
					</c:choose>
						<td> <a href="../item/itemDetail?itemid=<c:out value='${item.id}' /> "> <c:out value="${item.name}" /> </a> </td> 
	 					<td> <c:out value="${item.precio}" /> </td> 
						<td> <c:out value="${item.description}" /> </td> 
						<td> <fmt:formatDate type="date" value="${item.publicationDate}" /> </td> 				 					
						<td> <c:out value="${item.count}" /> </td> 
								<td>
									<c:choose>
									<c:when test="${item.newItem == 'true'}">
										New	
									</c:when>
									<c:otherwise>
										Used
									</c:otherwise>
								</c:choose>
								</td> 
						<td> <c:out value="${item.visitCounter}" /> </td> 
						<td> <a href="../user/viewProfile?userid=<c:out value='${item.user.id}' /> "><c:out value="${item.user.name}" /></a> </td> 
						<td> <c:out value="${item.category.name}" /> </td>
						<td> <c:out value="${item.type}" /> </td> 
					</tr>
				</c:forEach>
			</table>
			 -->
		</div>				
<%@ include file="footer.jsp" %>